package ae.pcfc.cldos.online.common.tscdb.domain;

import java.util.Date;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import ae.pcfc.cldos.online.common.domain.BaseEntity;

/**
 * TTscClientPersonRole entity. @author Asna Khader
 */
@Entity
@Table(name = "T_TSC_CLIENT_PERSON_ROLE")
public class TTscClientPersonRole extends BaseEntity implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	private TTscClientPersonRoleId id;
	private String cprStatus;
	private String cprCreateduser;
	private Date cprCreatedtime;
	private String cprModifieduser;
	private Date cprModifiedtime;

	// Constructors

	/** default constructor */
	public TTscClientPersonRole() {
	}

	/** full constructor */
	public TTscClientPersonRole(TTscClientPersonRoleId id, String cprStatus,
			String cprCreateduser, Date cprCreatedtime, String cprModifieduser,
			Date cprModifiedtime) {
		this.id = id;
		this.cprStatus = cprStatus;
		this.cprCreateduser = cprCreateduser;
		this.cprCreatedtime = cprCreatedtime;
		this.cprModifieduser = cprModifieduser;
		this.cprModifiedtime = cprModifiedtime;
	}

	// Property accessors
	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "cpClientid", column = @Column(name = "CP_CLIENTID", nullable = false, precision = 22, scale = 0)),
			@AttributeOverride(name = "crId", column = @Column(name = "CR_ID", nullable = false, length = 10)) })
	public TTscClientPersonRoleId getId() {
		return this.id;
	}

	public void setId(TTscClientPersonRoleId id) {
		this.id = id;
	}

	@Column(name = "CPR_STATUS", nullable = false, length = 1)
	public String getCprStatus() {
		return this.cprStatus;
	}

	public void setCprStatus(String cprStatus) {
		this.cprStatus = cprStatus;
	}

	@Column(name = "CPR_CREATEDUSER", nullable = false, length = 30)
	public String getCprCreateduser() {
		return this.cprCreateduser;
	}

	public void setCprCreateduser(String cprCreateduser) {
		this.cprCreateduser = cprCreateduser;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CPR_CREATEDTIME", nullable = false, length = 7)
	public Date getCprCreatedtime() {
		return this.cprCreatedtime;
	}

	public void setCprCreatedtime(Date cprCreatedtime) {
		this.cprCreatedtime = cprCreatedtime;
	}

	@Column(name = "CPR_MODIFIEDUSER", nullable = false, length = 30)
	public String getCprModifieduser() {
		return this.cprModifieduser;
	}

	public void setCprModifieduser(String cprModifieduser) {
		this.cprModifieduser = cprModifieduser;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "CPR_MODIFIEDTIME", nullable = false, length = 7)
	public Date getCprModifiedtime() {
		return this.cprModifiedtime;
	}

	public void setCprModifiedtime(Date cprModifiedtime) {
		this.cprModifiedtime = cprModifiedtime;
	}

}